package com.openbravo.bean;

import java.util.Date;

import cn.ekuma.data.dao.bean.I_AutoGeneratorStringKey;
import cn.ekuma.data.dao.bean.I_BaseBean;

public class PlaceState implements I_BaseBean<String>,I_AutoGeneratorStringKey{
	private String id;
    private String placeId;
    
    private String m_sGroupName;

    //当前状态
    private String m_sPlaceState;
    
    public static String PLACESTATE_empty="e";//空的
    public static String PLACESTATE_checkin="c";//入住
    public static String PLACESTATE_prearrange="p";//预订
    public static String PLACESTATE_helponesafe="h";//自用
    public static String PLACESTATE_cleaning="g";//保洁
    public static String PlACESTATE_fitment="f";//装修

    private String manager;
    
    private Date beginTime;//开台时间
    
    private Date changeTime;
    
    private int capacity;
    
    private double advancePrice;
    
    public PlaceState() {
		super();
		clear();
	}

	public boolean hasEnable() {
        return m_sPlaceState.equalsIgnoreCase(PLACESTATE_empty);
    }   

    public String getM_sGroupName() {
        return m_sGroupName;
    }

    public void setM_sGroupName(String m_sGroupName) {
        this.m_sGroupName = m_sGroupName;
    }

    public String getM_sPlaceState() {
        return m_sPlaceState;
    }

    public void setM_sPlaceState(String m_sPlaceState) {
        this.m_sPlaceState = m_sPlaceState;
    }

    public boolean isGroupPlace(){
        return m_sGroupName!=null&&!m_sGroupName.isEmpty();
    }
    
	@Override
	public String getKey() {
		// TODO Auto-generated method stub
		return this.id;
	}
	@Override
	public void setKey(String key) {
		this.id=key;	
	}
	public Date getLastModifier() {
		return changeTime;
	}
	public void setLastModifier(Date lastModifier) {
		this.changeTime = lastModifier;
	}
	public String getPlaceId() {
		return placeId;
	}
	public void setPlaceId(String placeId) {
		this.placeId = placeId;
	}
	public String getManager() {
		return manager;
	}
	public void setManager(String manager) {
		this.manager = manager;
	}
	public int getCapacity() {
		return capacity;
	}
	public void setCapacity(int capacity) {
		this.capacity = capacity;
	}

	public Date getChangeTime() {
		return changeTime;
	}

	public void setChangeTime(Date changeTime) {
		this.changeTime = changeTime;
	}

	public double getAdvancePrice() {
		return advancePrice;
	}

	public void setAdvancePrice(double advancePrice) {
		this.advancePrice = advancePrice;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}
	
	public void clear(){
		m_sPlaceState=PLACESTATE_empty;
		beginTime=null;
		changeTime=null;
		m_sGroupName=null;
		advancePrice=0.0;
		capacity=1;
	}
}
